Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rollout trafficrouting support requestHeaderModifier #156

Merged
merged 1 commit into from
Jul 5, 2023

Conversation

zmberg
Copy link
Member

@zmberg zmberg commented Jul 4, 2023

Ⅰ. Describe what this PR does

TrafficRouting add RequestHeaderModifier field
Add grayscale traffic to header[x-mse-tag]=gray, in turn, the microservices governance solutions MSE and Isito can identify which traffic is base traffic and which is grey traffic.

// Set overwrites the request with the given header (name, value)
// before the action.
//
// Input:
//   GET /foo HTTP/1.1
//   my-header: foo
//
// requestHeaderModifier:
//   set:
//   - name: "my-header"
//     value: "bar"
//
// Output:
//   GET /foo HTTP/1.1
//   my-header: bar
//

apiVersion: rollouts.kruise.io/v1alpha1
kind: TrafficRouting
metadata:
  name: mse-traffic
spec:
  objectRef:
    - service: spring-cloud-a
      ingress:
        name: spring-cloud-a
        classType: mse
  strategy:
    ...
    requestHeaderModifier:
      set:
      - name: x-mse-tag
        value: gray

@kruise-bot kruise-bot requested review from FillZpp and veophi July 4, 2023 06:41
@zmberg zmberg force-pushed the requestHeaderModifier-new branch from 12234b7 to 9370dbf Compare July 4, 2023 08:42
@codecov-commenter
Copy link

Codecov Report

Merging #156 (9370dbf) into master (7139171) will increase coverage by 0.08%.
The diff coverage is 92.85%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master     #156      +/-   ##
==========================================
+ Coverage   43.67%   43.76%   +0.08%     
==========================================
  Files          50       50              
  Lines        5259     5267       +8     
==========================================
+ Hits         2297     2305       +8     
  Misses       2575     2575              
  Partials      387      387              
Flag Coverage Δ
unittests 43.76% <92.85%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/trafficrouting/network/ingress/ingress.go 38.62% <92.85%> (+1.74%) ⬆️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@furykerry furykerry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@zmberg
Copy link
Member Author

zmberg commented Jul 5, 2023

/approve

@kruise-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zmberg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kruise-bot kruise-bot merged commit 1d343d5 into openkruise:master Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants